/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-03-30
 * Time:17:27
 */
public class Rectangle {
    private double length;
    private double width;

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getArea(){

        return  length*width;
    }

    public double getPer(){

        return 2*(length+width);
    }
    public void showAll()
    {
        System.out.println("长："+length);
        System.out.println("宽："+width);
        System.out.println("面积："+getArea());
        System.out.println("周长："+getPer());
    }
}
